import socket
sk=socket.socket(type=socket.SOCK_DGRAM)
server = ('127.0.0.1', 9001)
while True:
    mesg=input('>>>')
    if mesg.upper()=='Q':
        break
    sk.sendto(mesg.encode('utf-8'),server)
    msg=sk.recv(1024)
    if msg.upper()=='Q':
        break
    print(msg.decode('utf-8'))














